<template>
    <div>
        <div>{{userId}}</div>
        <div>{{getUserInfo}}</div>
    </div>

</template>

<script>
    export default {
        name: "Detail",
        props: [
            "userId",
            "userList"
        ],
        computed: {
            getUserInfo() {
                return this.userList.filter((item, index) => {
                    // console.log(item, index, item.id);
                    if (item.id === this.userId) {
                        return item
                    }
                });
            }
        }
    }
</script>

<style scoped>

</style>
